<jsp:include page="logincheck.jsp" />
<%@ page import="java.util.*" %>

<jsp:useBean id="adminAcct" class="se2.Administrator" scope="request"/>
<jsp:setProperty name="adminAcct" property="*"/>

	
<% 
	
	if (adminAcct.addAdministrator())
	{
%>
		<jsp:forward page="viewAdministratorAccount.jsp" />
<%
	
	}
	else
	{
		out.println("Failed to Create Administratort Account");
		String msg = adminAcct.getMsg();
		String s = "error.jsp?&url=addAdministratorAccount.jsp";
		if (msg.length() != 0)
		{
			s += "&msg=" + msg;
		}
%>

				<jsp:forward page="<%= s %>" />

<%
	}
%>

